package defpackage; import android.support.v4.app.FrameMetricsAggregator; import android.support.v4.view.InputDeviceCompat; import cn.wps.moffice.templatecommon.ext.widget.banner.bean.Banners; import cn.wps.moffice.writer.core.TextDocument; import com.appsflyer.BuildConfig; import com.baidu.tts.loopj.AsyncHttpResponseHandler; import com.mopub.common.AdType; import com.mopub.mobileads.VastExtensionXmlManager; import defpackage.mdq; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.ArrayList; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.cookie.CookiePolicy; import org.apache.commons.logging.LogFactory; /* renamed from: ofv reason: default package */ public final class ofv implements mth { private static final String TAG = null; private static String VB(int i) { switch (i) { case 0: return "dark1"; case 1: return "light1"; case 2: return "dark2"; case 3: return "light2"; case 4: return "accent1"; case 5: return "accent2"; case 6: return "accent3"; case 7: return "accent4"; case 8: return "accent5"; case 9: return "accent6"; case 10: return "hyperlink"; case 11: return "followedHyperlink"; default: ew.eI(); return "accent1"; } } private static String VC(int i) { ew.eH(); return i == 0 ? "clean" : "dirty"; } public static void a(TextDocument textDocument, odf odf) { kgd kgd = textDocument.oPf; odf.i("w:settings", "xmlns:w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "xmlns:m", "http://schemas.openxmlformats.org/officeDocument/2006/math"); a(odf, textDocument, kgd); odf.endElement("w:settings"); } private static void a(odf odf, TextDocument textDocument, kgd kgd) { int i; String str; int i2; String str2; String str3; String str4; String str5; String str6; int i3; int i4; String str7; String str8; String str9; String str10; String str11; String str12; String str13; String str14; int i5; String str15; int i6 = 2; int i7 = kgd.getInt(396, 0); if (i7 != 0) { switch (i7) { case 0: str15 = "none"; break; case 1: str15 = "print"; break; case 2: str15 = "outline"; break; case 3: str15 = "masterPages"; break; case 4: str15 = "normal"; break; case 5: str15 = Banners.ACTION_WEB; break; default: ew.eI(); str15 = "none"; break; } odf.fE("w:view", str15); } Integer valueOf = Integer.valueOf(kgd.getInt(BuildConfig.AF_BUILD_VERSION, 0)); Object sp = kgd.sp(385); if (!(valueOf.intValue() == 0 && sp == null)) { String[] strArr = new String[4]; if (valueOf.intValue() != 0) { strArr[0] = "w:val"; switch (valueOf.intValue()) { case 0: str = "none"; break; case 1: str = "fullPage"; break; case 2: str = "bestFit"; break; case 3: str = "textFit"; break; default: ew.eI(); str = "none"; break; } strArr[1] = str; i = 2; } else { i = 0; } if (sp != null) { int i8 = i + 1; strArr[i] = "w:percent"; i = i8 + 1; strArr[i8] = Integer.toString(((Integer) sp).intValue()); } odf.a("w:zoom", strArr, i); } ogi.a(kgd, 397, "w:removePersonalInformation", odf, false); ogi.a(kgd, 398, "w:removeDateAndTime", odf, false); ogi.a(kgd, 399, "w:doNotDisplayPageBoundaries", odf, false); ogi.a(kgd, HttpStatus.SC_BAD_REQUEST, "w:displayBackgroundShape", odf, false); ogi.a(kgd, HttpStatus.SC_UNAUTHORIZED, "w:printPostScriptOverText", odf, false); ogi.a(kgd, HttpStatus.SC_PAYMENT_REQUIRED, "w:printFractionalCharacterWidth", odf, false); ogi.a(kgd, HttpStatus.SC_FORBIDDEN, "w:printFormsData", odf, false); ogi.a(kgd, HttpStatus.SC_NOT_FOUND, "w:embedTrueTypeFonts", odf, false); ogi.a(kgd, HttpStatus.SC_METHOD_NOT_ALLOWED, "w:embedSystemFonts", odf, false); ogi.a(kgd, HttpStatus.SC_NOT_ACCEPTABLE, "w:saveSubsetFonts", odf, false); ogi.a(kgd, HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED, "w:saveFormsData", odf, false); ogi.a(kgd, HttpStatus.SC_REQUEST_TIMEOUT, "w:mirrorMargins", odf, false); ogi.a(kgd, HttpStatus.SC_CONFLICT, "w:alignBordersAndEdges", odf, false); ogi.a(kgd, HttpStatus.SC_GONE, "w:bordersDoNotSurroundHeader", odf, false); ogi.a(kgd, HttpStatus.SC_LENGTH_REQUIRED, "w:bordersDoNotSurroundFooter", odf, false); ogi.a(kgd, HttpStatus.SC_PRECONDITION_FAILED, "w:gutterAtTop", odf, false); ogi.a(kgd, HttpStatus.SC_REQUEST_TOO_LONG, "w:hideSpellingErrors", odf, false); ogi.a(kgd, HttpStatus.SC_REQUEST_URI_TOO_LONG, "w:hideGrammaticalErrors", odf, false); int i9 = kgd.getInt(HttpStatus.SC_UNSUPPORTED_MEDIA_TYPE, 1); int i10 = kgd.getInt(HttpStatus.SC_REQUESTED_RANGE_NOT_SATISFIABLE, 1); if (!(1 == i9 && 1 == i10)) { String[] strArr2 = new String[4]; if (1 != i10) { strArr2[0] = "w:spelling"; strArr2[1] = VC(i10); i5 = 2; } else { i5 = 0; } if (1 != i9) { int i11 = i5 + 1; strArr2[i5] = "w:grammar"; i5 = i11 + 1; strArr2[i11] = VC(i9); } odf.a("w:proofState", strArr2, i5); } ogi.a(kgd, HttpStatus.SC_EXPECTATION_FAILED, "w:formsDesign", odf, false); Object sp2 = kgd.sp(421); if (sp2 != null) { try { odf.j("w:attachedTemplate", "r:id", odf.qti.iI(URLDecoder.decode(((String) sp2).replaceAll("\\\\", "/"), AsyncHttpResponseHandler.DEFAULT_CHARSET), "http://schemas.openxmlformats.org/officeDocument/2006/relationships/attachedTemplate").id); } catch (IllegalArgumentException e) { hm.e(TAG, "create relationship error!", e); } catch (UnsupportedEncodingException e2) { ew.eJ(); } } ogi.a(kgd, 418, "w:linkStyles", odf, false); String[] strArr3 = new String[34]; Object sp3 = kgd.sp(437); if (sp3 != null) { int intValue = ((Integer) sp3).intValue(); strArr3[0] = "w:val"; strArr3[1] = Integer.toHexString(intValue); strArr3[2] = "w:allStyles"; strArr3[3] = ogi.zM(hG(intValue, 1)); strArr3[4] = "w:customStyles"; strArr3[5] = ogi.zM(hG(intValue, 2)); strArr3[6] = "w:latentStyles"; strArr3[7] = ogi.zM(hG(intValue, 4)); strArr3[8] = "w:stylesInUse"; strArr3[9] = ogi.zM(hG(intValue, 8)); strArr3[10] = "w:headingStyles"; strArr3[11] = ogi.zM(hG(intValue, 32)); strArr3[12] = "w:numberingStyles"; strArr3[13] = ogi.zM(hG(intValue, 64)); strArr3[14] = "w:tableStyles"; strArr3[15] = ogi.zM(hG(intValue, 128)); strArr3[16] = "w:directFormattingOnRuns"; strArr3[17] = ogi.zM(hG(intValue, 256)); strArr3[18] = "w:directFormattingOnParagraphs"; strArr3[19] = ogi.zM(hG(intValue, 512)); strArr3[20] = "w:directFormattingOnNumbering"; strArr3[21] = ogi.zM(hG(intValue, 1024)); strArr3[22] = "w:directFormattingOnTables"; strArr3[23] = ogi.zM(hG(intValue, 2048)); strArr3[24] = "w:clearFormatting"; strArr3[25] = ogi.zM(hG(intValue, 4096)); strArr3[26] = "w:top3HeadingStyles"; strArr3[27] = ogi.zM(hG(intValue, 8192)); strArr3[28] = "w:visibleStyles"; strArr3[29] = ogi.zM(hG(intValue, 16384)); strArr3[30] = "w:alternateStyleNames"; strArr3[31] = ogi.zM(hG(intValue, 32768)); odf.a("w:stylePaneFormatFilter", strArr3, 32); } Object sp4 = kgd.sp(438); if (sp4 != null) { switch (((Integer) sp4).intValue()) { case 0: str14 = "0000"; break; case 1: str14 = "0001"; break; case 2: str14 = "0002"; break; case 3: str14 = "0003"; break; case 4: str14 = "0004"; break; case 5: str14 = "0005"; break; case 6: str14 = "name"; break; case 7: str14 = LogFactory.PRIORITY_KEY; break; case 8: str14 = CookiePolicy.DEFAULT; break; case 9: str14 = "font"; break; case 10: str14 = "basedOn"; break; case 11: str14 = VastExtensionXmlManager.TYPE; break; default: ew.eI(); str14 = CookiePolicy.DEFAULT; break; } odf.fE("w:stylePaneSortMethod", str14); } Object sp5 = kgd.sp(439); if (sp5 != null) { odf.fE("w:documentType", (String) sp5); } ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("sPr should not be null!", kgd); String[] strArr4 = new String[10]; Object sp6 = kgd.sp(443); if (sp6 != null) { strArr4[0] = "w:markup"; strArr4[1] = ogi.zL(((Boolean) sp6).booleanValue()); i2 = 2; } else { i2 = 0; } Object sp7 = kgd.sp(444); if (sp7 != null) { int i12 = i2 + 1; strArr4[i2] = "w:comments"; i2 = i12 + 1; strArr4[i12] = ogi.zL(((Boolean) sp7).booleanValue()); } Object sp8 = kgd.sp(445); if (sp8 != null) { int i13 = i2 + 1; strArr4[i2] = "w:insDel"; i2 = i13 + 1; strArr4[i13] = ogi.zL(((Boolean) sp8).booleanValue()); } Object sp9 = kgd.sp(446); if (sp9 != null) { int i14 = i2 + 1; strArr4[i2] = "w:formatting"; i2 = i14 + 1; strArr4[i14] = ogi.zL(((Boolean) sp9).booleanValue()); } Object sp10 = kgd.sp(447); if (sp10 != null) { int i15 = i2 + 1; strArr4[i2] = "w:inkAnnotations"; i2 = i15 + 1; strArr4[i15] = ogi.zL(((Boolean) sp10).booleanValue()); } if (i2 != 0) { odf.a("w:revisionView", strArr4, i2); } if (textDocument.oRx) { odf.j("w:trackRevisions", new String[0]); } ogi.a(kgd, HttpStatus.SC_INSUFFICIENT_SPACE_ON_RESOURCE, "w:doNotTrackMoves", odf, false); ogi.a(kgd, HttpStatus.SC_METHOD_FAILURE, "w:doNotTrackFormatting", odf, false); ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("sPr should not be null!", kgd); ArrayList<String> arrayList = new ArrayList<>(); boolean z = kgd.getBoolean(632, false); boolean z2 = kgd.getBoolean(630, false); boolean z3 = kgd.getBoolean(631, false); boolean z4 = kgd.getBoolean(633, false); boolean z5 = kgd.getBoolean(639, false); Object sp11 = kgd.sp(629); if (z5 && sp11 != null) { arrayList.add("w:edit"); switch (((Integer) sp11).intValue()) { case 0: str13 = "trackedChanges"; break; case 1: str13 = "comments"; break; case 2: str13 = "forms"; break; case 3: str13 = "readOnly"; break; case 4: case 5: case 6: default: ew.eI(); str13 = "none"; break; case 7: str13 = "none"; break; } arrayList.add(str13); } Object sp12 = kgd.sp(635); if (sp12 != null) { arrayList.add("w:formatting"); arrayList.add(ogi.zM(((Boolean) sp12).booleanValue())); } if (!(sp11 == null && sp12 == null)) { boolean z6 = kgd.getBoolean(637, false); arrayList.add("w:enforcement"); arrayList.add(ogi.zM(z6 || z || z4 || z2 || z3)); ew.assertNotNull("attr should not be null!", arrayList); ew.assertNotNull("sPr should not be null!", kgd); Object sp13 = kgd.sp(638); if (sp13 != null) { arrayList.add("w:algorithmName"); arrayList.add((String) sp13); } Object sp14 = kgd.sp(614); if (sp14 != null) { arrayList.add("w:hashValue"); arrayList.add((String) sp14); } Object sp15 = kgd.sp(615); if (sp15 != null) { arrayList.add("w:saltValue"); arrayList.add((String) sp15); } Object sp16 = kgd.sp(616); if (sp16 != null) { arrayList.add("w:spinCount"); arrayList.add(Integer.toString(((Integer) sp16).intValue())); } ew.assertNotNull("attr should not be null!", arrayList); ew.assertNotNull("sPr should not be null!", kgd); Object sp17 = kgd.sp(617); if (sp17 != null) { arrayList.add("w:cryptProviderType"); switch (((Integer) sp17).intValue()) { case 0: str4 = "rsaAES"; break; case 1: str4 = "rsaFull"; break; case 2: str4 = AdType.CUSTOM; break; default: ew.eI(); str4 = AdType.CUSTOM; break; } arrayList.add(str4); } Object sp18 = kgd.sp(618); if (sp18 != null) { arrayList.add("w:cryptAlgorithmClass"); switch (((Integer) sp18).intValue()) { case 0: str3 = "hash"; break; case 1: str3 = AdType.CUSTOM; break; default: ew.eI(); str3 = AdType.CUSTOM; break; } arrayList.add(str3); } Object sp19 = kgd.sp(619); if (sp19 != null) { arrayList.add("w:cryptAlgorithmType"); switch (((Integer) sp19).intValue()) { case 0: str2 = "typeAny"; break; case 1: str2 = AdType.CUSTOM; break; default: ew.eI(); str2 = AdType.CUSTOM; break; } arrayList.add(str2); } Object sp20 = kgd.sp(620); if (sp20 != null) { arrayList.add("w:cryptAlgorithmSid"); arrayList.add(Integer.toString(((Integer) sp20).intValue())); } Object sp21 = kgd.sp(621); if (sp21 != null) { arrayList.add("w:cryptSpinCount"); arrayList.add(Integer.toString(((Integer) sp21).intValue())); } Object sp22 = kgd.sp(622); if (sp22 != null) { arrayList.add("w:cryptProvider"); arrayList.add((String) sp22); } Object sp23 = kgd.sp(623); if (sp23 != null) { arrayList.add("w:algIdExt"); arrayList.add(Integer.toString(((Integer) sp23).intValue())); } Object sp24 = kgd.sp(624); if (sp24 != null) { arrayList.add("w:algIdExtSource"); arrayList.add((String) sp24); } Object sp25 = kgd.sp(625); if (sp25 != null) { arrayList.add("w:cryptProviderTypeExt"); arrayList.add(Integer.toString(((Integer) sp25).intValue())); } Object sp26 = kgd.sp(626); if (sp26 != null) { arrayList.add("w:cryptProviderTypeExtSource"); arrayList.add((String) sp26); } Object sp27 = kgd.sp(627); if (sp27 != null) { arrayList.add("w:hash"); arrayList.add((String) sp27); } Object sp28 = kgd.sp(628); if (sp28 != null) { arrayList.add("w:salt"); arrayList.add((String) sp28); } if (arrayList.size() > 0) { odf.d("w:documentProtection", arrayList); odf.endElement("w:documentProtection"); } } ogi.a(kgd, 440, "w:autoFormatOverride", odf, false); ogi.a(kgd, 441, "w:styleLockTheme", odf, false); ogi.a(kgd, 442, "w:styleLockQFSet", odf, false); Object sp29 = kgd.sp(377); if (sp29 != null) { odf.aO("w:defaultTabStop", (int) (((Float) sp29).floatValue() * 20.0f)); } ogi.a(kgd, 440, "w:autoFormatOverride", odf, false); ogi.a(kgd, 448, "w:hyphenationZone", odf); ogi.a(kgd, 451, "w:doNotHyphenateCaps", odf, false); ogi.a(kgd, 452, "w:showEnvelope", odf, false); Object sp30 = kgd.sp(453); if (sp30 != null) { odf.fE("w:summaryLength", ogi.eX(((Float) sp30).floatValue())); } Object sp31 = kgd.sp(454); if (sp31 != null) { odf.fE("w:clickAndTypeStyle", (String) sp31); } ogi.b(kgd, 455, "w:defaultTableStyle", odf); ogi.a(kgd, 391, "w:evenAndOddHeaders", odf, false); ogi.a(kgd, 456, "w:bookFoldRevPrinting", odf, false); ogi.a(kgd, 457, "w:bookFoldPrinting", odf, false); ogi.c(kgd, 458, "w:bookFoldPrintingSheets", odf); ogi.c(kgd, 459, "w:drawingGridHorizontalSpacing", odf); ogi.c(kgd, 460, "w:drawingGridVerticalSpacing", odf); ogi.c(kgd, 394, "w:displayHorizontalDrawingGridEvery", odf); ogi.c(kgd, 395, "w:displayVerticalDrawingGridEvery", odf); ogi.a(kgd, 463, "w:doNotUseMarginsForDrawingGridOrigin", odf, false); ogi.c(kgd, 464, "w:drawingGridHorizontalOrigin", odf); ogi.c(kgd, 465, "w:drawingGridVerticalOrigin", odf); ogi.a(kgd, 466, "w:doNotShadeFormData", odf, false); ogi.a(kgd, 383, "w:noPunctuationKerning", odf, false); Object sp32 = kgd.sp(382); if (sp32 != null) { switch (((Integer) sp32).intValue()) { case 0: str12 = "doNotCompress"; break; case 1: str12 = "compressPunctuation"; break; case 2: str12 = "compressPunctuationAndJapaneseKana"; break; default: ew.eI(); str12 = "doNotCompress"; break; } odf.fE("w:characterSpacingControl", str12); } ogi.a(kgd, 467, "w:printTwoOnOne", odf, false); int i16 = kgd.getInt(384, -1); if (1 == i16) { odf.j("w:strictFirstAndLastChars", new String[0]); } else if (2 == i16) { String string = kgd.getString(378, null); int i17 = kgd.getInt(379, 0); String string2 = kgd.getString(380, null); kgd.getInt(381, 0); ew.eH(); ew.eH(); ew.eH(); ew.eH(); ew.eH(); switch (i17) { case 1: str5 = "ja-JP"; break; case 2: str5 = "zh-CN"; break; case 3: str5 = "ko-KR"; break; case 4: str5 = "zh-TW"; break; default: ew.eI(); str5 = null; break; } if (!(string == null || str5 == null)) { odf.j("w:noLineBreaksAfter", "w:lang", str5, "w:val", string2); } if (!(string2 == null || str5 == null)) { odf.j("w:noLineBreaksBefore", "w:lang", str5, "w:val", string); } } ogi.a(kgd, 469, "w:savePreviewPicture", odf, false); ogi.a(kgd, 470, "w:doNotValidateAgainstSchema", odf, false); ogi.a(kgd, 471, "w:saveInvalidXml", odf, false); ogi.a(kgd, 472, "w:ignoreMixedContent", odf, false); ogi.a(kgd, 473, "w:alwaysShowPlaceholderText", odf, false); ogi.a(kgd, 474, "w:doNotDemarcateInvalidXml", odf, false); ogi.a(kgd, 475, "w:saveXmlDataOnly", odf, false); ogi.a(kgd, 476, "w:useXSLTWhenSaving", odf, false); ogi.a(kgd, 477, "w:showXMLTags", odf, false); ogi.a(kgd, 478, "w:alwaysMergeEmptyNamespace", odf, false); ogi.a(kgd, 479, "w:updateFields", odf, false); Object sp33 = kgd.sp(641); if (sp33 != null) { odf.i("w:endnotePr", new String[0]); String[] strArr5 = new String[2]; strArr5[0] = "w:val"; switch (((Integer) sp33).intValue()) { case 0: str6 = "sectEnd"; break; case 1: case 2: default: ew.fail(); str6 = "docEnd"; break; case 3: str6 = "docEnd"; break; } strArr5[1] = str6; odf.j("w:pos", strArr5); odf.endElement("w:endnotePr"); } odf.i("w:compat", new String[0]); ogi.a(kgd, 480, "w:useSingleBorderforContiguousCells", odf, false); ogi.a(kgd, 481, "w:wpJustification", odf, false); ogi.a(kgd, 482, "w:noTabHangInd", odf, false); ogi.a(kgd, 483, "w:noLeading", odf, false); ogi.a(kgd, 484, "w:spaceForUL", odf, false); ogi.a(kgd, 485, "w:noColumnBalance", odf, false); ogi.a(kgd, 388, "w:balanceSingleByteDoubleByteWidth", odf, false); ogi.a(kgd, 487, "w:noExtraLineSpacing", odf, false); ogi.a(kgd, 488, "w:doNotLeaveBackslashAlone", odf, false); ogi.a(kgd, 489, "w:ulTrailSpace", odf, false); ogi.a(kgd, 387, "w:doNotExpandShiftReturn", odf, false); ogi.a(kgd, 490, "w:spacingInWholePoints", odf, false); ogi.a(kgd, 491, "w:lineWrapLikeWord6", odf, false); ogi.a(kgd, 492, "w:printBodyTextBeforeHeader", odf, false); ogi.a(kgd, 493, "w:printColBlack", odf, false); ogi.a(kgd, 494, "w:wpSpaceWidth", odf, false); ogi.a(kgd, 495, "w:showBreaksInFrames", odf, false); ogi.a(kgd, 496, "w:subFontBySize", odf, false); ogi.a(kgd, 497, "w:suppressBottomSpacing", odf, false); ogi.a(kgd, 498, "w:suppressTopSpacing", odf, false); ogi.a(kgd, 499, "w:suppressSpacingAtTopOfPage", odf, false); ogi.a(kgd, 500, "w:suppressTopSpacingWP", odf, false); ogi.a(kgd, HttpStatus.SC_NOT_IMPLEMENTED, "w:suppressSpBfAfterPgBrk", odf, false); ogi.a(kgd, HttpStatus.SC_BAD_GATEWAY, "w:swapBordersFacingPages", odf, false); ogi.a(kgd, HttpStatus.SC_SERVICE_UNAVAILABLE, "w:convMailMergeEsc", odf, false); ogi.a(kgd, HttpStatus.SC_GATEWAY_TIMEOUT, "w:truncateFontHeightsLikeWP6", odf, false); ogi.a(kgd, HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED, "w:mwSmallCaps", odf, false); ogi.a(kgd, 506, "w:usePrinterMetrics", odf, false); ogi.a(kgd, HttpStatus.SC_INSUFFICIENT_STORAGE, "w:doNotSuppressParagraphBorders", odf, false); ogi.a(kgd, 508, "w:wrapTrailSpaces", odf, false); ogi.a(kgd, 509, "w:footnoteLayoutLikeWW8", odf, false); ogi.a(kgd, 541, "w:shapeLayoutLikeWW8", odf, false); ogi.a(kgd, 389, "w:alignTablesRowByRow", odf, false); ogi.a(kgd, 510, "w:forgetLastTabAlignment", odf, false); ogi.a(kgd, 393, "w:adjustLineHeightInTable", odf, false); ogi.a(kgd, FrameMetricsAggregator.EVERY_DURATION, "w:autoSpaceLikeWord95", odf, false); ogi.a(kgd, 512, "w:noSpaceRaiseLower", odf, false); ogi.a(kgd, InputDeviceCompat.SOURCE_DPAD, "w:doNotUseHTMLParagraphAutoSpacing", odf, false); ogi.a(kgd, 514, "w:layoutRawTableWidth", odf, false); ogi.a(kgd, 515, "w:layoutTableRowsApart", odf, false); ogi.a(kgd, 516, "w:useWord97LineBreakRules", odf, false); ogi.a(kgd, 517, "w:doNotBreakWrappedTables", odf, false); ogi.a(kgd, 518, "w:doNotSnapToGridInCell", odf, false); ogi.a(kgd, 519, "w:selectFldWithFirstOrLastChar", odf, false); ogi.a(kgd, 520, "w:applyBreakingRules", odf, false); ogi.a(kgd, 521, "w:doNotWrapTextWithPunct", odf, false); ogi.a(kgd, 522, "w:doNotUseEastAsianBreakRules", odf, false); ogi.a(kgd, 523, "w:useWord2002TableStyleRules", odf, false); ogi.a(kgd, 524, "w:growAutofit", odf, false); ogi.a(kgd, 525, "w:useFELayout", odf, false); ogi.a(kgd, 526, "w:useNormalStyleForList", odf, false); ogi.a(kgd, 527, "w:doNotUseIndentAsNumberingTabStop", odf, false); ogi.a(kgd, 528, "w:useAltKinsokuLineBreakRules", odf, false); ogi.a(kgd, 529, "w:allowSpaceOfSameStyleInTable", odf, false); ogi.a(kgd, 530, "w:doNotSuppressIndentation", odf, false); ogi.a(kgd, 531, "w:doNotAutofitConstrainedTables", odf, false); ogi.a(kgd, 532, "w:autofitToFirstFixedWidthCell", odf, false); ogi.a(kgd, 533, "w:underlineTabInNumList", odf, false); ogi.a(kgd, 534, "w:displayHangulFixedWidth", odf, false); ogi.a(kgd, 535, "w:splitPgBreakAndParaMark", odf, false); ogi.a(kgd, 536, "w:doNotVertAlignCellWithSp", odf, false); ogi.a(kgd, 537, "w:doNotBreakConstrainedForcedTable", odf, false); ogi.a(kgd, 538, "w:doNotVertAlignInTxbx", odf, false); ogi.a(kgd, 539, "w:useAnsiKerningPairs", odf, false); ogi.a(kgd, 540, "w:cachedColBalance", odf, false); Object sp34 = kgd.sp(542); if (sp34 != null) { a(odf, (myt[]) sp34); } else { odf.j("w:compatSetting", "w:name", "compatibilityMode", "w:uri", "http://schemas.microsoft.com/office/word", "w:val", String.valueOf(oex.qun.aGw)); } odf.endElement("w:compat"); a(odf, textDocument.dIN()); Object sp35 = kgd.sp(642); if (sp35 != null) { odf.i("m:mathPr", new String[0]); kgd dSj = ((mzm) sp35).dSj(); Object sp36 = dSj.sp(598); if (sp36 != null) { odf.j("m:mathFont", "m:val", (String) sp36); } Object sp37 = dSj.sp(599); if (sp37 != null) { String[] strArr6 = new String[2]; strArr6[0] = "m:val"; switch (((Integer) sp37).intValue()) { case 0: str11 = "before"; break; case 1: str11 = "after"; break; case 2: str11 = "repeat"; break; default: ew.eI(); str11 = "before"; break; } strArr6[1] = str11; odf.j("m:brkBin", strArr6); } Object sp38 = dSj.sp(600); if (sp38 != null) { String[] strArr7 = new String[2]; strArr7[0] = "m:val"; switch (((Integer) sp38).intValue()) { case 0: str10 = "--"; break; case 1: str10 = "+-"; break; case 2: str10 = "-+"; break; default: ew.eI(); str10 = "--"; break; } strArr7[1] = str10; odf.j("m:brkBinSub", strArr7); } Object sp39 = dSj.sp(601); if (sp39 != null) { odf.j("m:smallFrac", "m:val", ogi.zM(((Boolean) sp39).booleanValue())); } Object sp40 = dSj.sp(602); if (sp40 != null && ((Boolean) sp40).booleanValue()) { odf.j("m:dispDef", new String[0]); } Object sp41 = dSj.sp(603); if (sp41 != null) { odf.j("m:lMargin", "m:val", Integer.toString(((Integer) sp41).intValue())); } Object sp42 = dSj.sp(604); if (sp42 != null) { odf.j("m:rMargin", "m:val", Integer.toString(((Integer) sp42).intValue())); } Object sp43 = dSj.sp(605); if (sp43 != null) { String[] strArr8 = new String[2]; strArr8[0] = "m:val"; switch (((Integer) sp43).intValue()) { case 0: str9 = "centerGroup"; break; case 1: str9 = "centerGroup"; break; case 2: str9 = "center"; break; case 3: str9 = "left"; break; case 4: str9 = "right"; break; default: ew.eI(); str9 = "centerGroup"; break; } strArr8[1] = str9; odf.j("m:defJc", strArr8); } Object sp44 = dSj.sp(606); if (sp44 != null) { odf.j("m:preSp", "m:val", Integer.toString(((Integer) sp44).intValue())); } Object sp45 = dSj.sp(607); if (sp45 != null) { odf.j("m:postSp", "m:val", Integer.toString(((Integer) sp45).intValue())); } Object sp46 = dSj.sp(608); if (sp46 != null) { odf.j("m:interSp", "m:val", Integer.toString(((Integer) sp46).intValue())); } Object sp47 = dSj.sp(609); if (sp47 != null) { odf.j("m:intraSp", "m:val", Integer.toString(((Integer) sp47).intValue())); } Object sp48 = dSj.sp(610); if (sp48 != null) { odf.j("m:wrapIndent", "m:val", Integer.toString(((Integer) sp48).intValue())); } Object sp49 = dSj.sp(611); if (sp49 != null && ((Boolean) sp49).booleanValue()) { odf.j("m:wrapRight", new String[0]); } Object sp50 = dSj.sp(612); if (sp50 != null) { String[] strArr9 = new String[2]; strArr9[0] = "m:val"; switch (((Integer) sp50).intValue()) { case 0: str8 = "subSup"; break; case 1: str8 = "undOvr"; break; default: ew.eI(); str8 = "subSup"; break; } strArr9[1] = str8; odf.j("m:intLim", strArr9); } Object sp51 = dSj.sp(613); if (sp51 != null) { String[] strArr10 = new String[2]; strArr10[0] = "m:val"; switch (((Integer) sp51).intValue()) { case 0: str7 = "subSup"; break; case 1: str7 = "undOvr"; break; default: ew.eI(); str7 = "undOvr"; break; } strArr10[1] = str7; odf.j("m:naryLim", strArr10); } odf.endElement("m:mathPr"); } Object sp52 = kgd.sp(546); if (sp52 != null) { a(odf, (String[]) sp52); } ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("sPr should not be null!", kgd); String[] strArr11 = new String[6]; Object sp53 = kgd.sp(571); if (sp53 != null) { strArr11[0] = "w:val"; strArr11[1] = (String) sp53; i3 = 2; } else { i3 = 0; } Object sp54 = kgd.sp(573); if (sp54 != null) { int i18 = i3 + 1; strArr11[i3] = "w:bidi"; i3 = i18 + 1; strArr11[i18] = (String) sp54; } Object sp55 = kgd.sp(572); if (sp55 != null) { int i19 = i3 + 1; strArr11[i3] = "w:eastAsia"; i3 = i19 + 1; strArr11[i19] = (String) sp55; } if (i3 != 0) { odf.a("w:themeFontLang", strArr11, i3); } ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("sPr should not be null!", kgd); String[] strArr12 = new String[24]; Object sp56 = kgd.sp(549); if (sp56 != null) { strArr12[0] = "w:bg1"; strArr12[1] = VB(((Integer) sp56).intValue()); i4 = 2; } else { i4 = 0; } Object sp57 = kgd.sp(550); if (sp57 != null) { int i20 = i4 + 1; strArr12[i4] = "w:t1"; i4 = i20 + 1; strArr12[i20] = VB(((Integer) sp57).intValue()); } Object sp58 = kgd.sp(551); if (sp58 != null) { int i21 = i4 + 1; strArr12[i4] = "w:bg2"; i4 = i21 + 1; strArr12[i21] = VB(((Integer) sp58).intValue()); } Object sp59 = kgd.sp(552); if (sp59 != null) { int i22 = i4 + 1; strArr12[i4] = "w:t2"; i4 = i22 + 1; strArr12[i22] = VB(((Integer) sp59).intValue()); } Object sp60 = kgd.sp(553); if (sp60 != null) { int i23 = i4 + 1; strArr12[i4] = "w:accent1"; i4 = i23 + 1; strArr12[i23] = VB(((Integer) sp60).intValue()); } Object sp61 = kgd.sp(554); if (sp61 != null) { int i24 = i4 + 1; strArr12[i4] = "w:accent2"; i4 = i24 + 1; strArr12[i24] = VB(((Integer) sp61).intValue()); } Object sp62 = kgd.sp(555); if (sp62 != null) { int i25 = i4 + 1; strArr12[i4] = "w:accent3"; i4 = i25 + 1; strArr12[i25] = VB(((Integer) sp62).intValue()); } Object sp63 = kgd.sp(556); if (sp63 != null) { int i26 = i4 + 1; strArr12[i4] = "w:accent4"; i4 = i26 + 1; strArr12[i26] = VB(((Integer) sp63).intValue()); } Object sp64 = kgd.sp(557); if (sp64 != null) { int i27 = i4 + 1; strArr12[i4] = "w:accent5"; i4 = i27 + 1; strArr12[i27] = VB(((Integer) sp64).intValue()); } Object sp65 = kgd.sp(558); if (sp65 != null) { int i28 = i4 + 1; strArr12[i4] = "w:accent6"; i4 = i28 + 1; strArr12[i28] = VB(((Integer) sp65).intValue()); } Object sp66 = kgd.sp(559); if (sp66 != null) { int i29 = i4 + 1; strArr12[i4] = "w:hyperlink"; i4 = i29 + 1; strArr12[i29] = VB(((Integer) sp66).intValue()); } Object sp67 = kgd.sp(560); if (sp67 != null) { int i30 = i4 + 1; strArr12[i4] = "w:followedHyperlink"; i4 = i30 + 1; strArr12[i30] = VB(((Integer) sp67).intValue()); } if (i4 != 0) { odf.a("w:clrSchemeMapping", strArr12, i4); } ogi.a(kgd, 547, "w:doNotIncludeSubdocsInStats", odf, false); ogi.a(kgd, 548, "w:doNotAutoCompressPictures", odf, false); ogi.a(kgd, 570, "w:forceUpgrade", odf, false); a(odf, kgd); ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("sPr should not be null!", kgd); String[] strArr13 = new String[8]; Object sp68 = kgd.sp(563); if (sp68 != null) { strArr13[0] = "w:actualPg"; strArr13[1] = ogi.zL(((Boolean) sp68).booleanValue()); } else { i6 = 0; } Object sp69 = kgd.sp(564); if (sp69 != null) { int i31 = i6 + 1; strArr13[i6] = "w:w"; i6 = i31 + 1; strArr13[i31] = Integer.toString(((Integer) sp69).intValue()); } Object sp70 = kgd.sp(565); if (sp70 != null) { int i32 = i6 + 1; strArr13[i6] = "w:h"; i6 = i32 + 1; strArr13[i32] = Integer.toString(((Integer) sp70).intValue()); } Object sp71 = kgd.sp(566); if (sp71 != null) { int i33 = i6 + 1; strArr13[i6] = "w:fontSz"; i6 = i33 + 1; strArr13[i33] = ogi.eX(((Float) sp71).floatValue()); } if (i6 != 0) { odf.a("w:readModeInkLockDown", strArr13, i6); } Object sp72 = kgd.sp(574); if (sp72 != null) { a(odf, (mzu[]) sp72); } ogi.a(kgd, 567, "w:doNotEmbedSmartTags", odf, false); ogi.b(kgd, 568, "w:decimalSymbol", odf); ogi.b(kgd, 569, "w:listSeparator", odf); } private static void a(odf odf, kgd kgd) { int i; int i2; String str; Object sp = kgd.sp(562); Object sp2 = kgd.sp(561); if (!(sp == null && sp2 == null)) { odf.i("w:captions", new String[0]); myp[] mypArr = (myp[]) sp2; for (myp myp : mypArr) { ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("caption should not be null!", myp); String[] strArr = new String[14]; String str2 = myp.mName; if (str2 != null) { strArr[0] = "w:name"; strArr[1] = str2; i2 = 2; } else { i2 = 0; } Integer num = myp.puh; if (num != null) { int i3 = i2 + 1; strArr[i2] = "w:pos"; int i4 = i3 + 1; int intValue = num.intValue(); ew.eH(); switch (intValue) { case 0: str = "above"; break; case 1: str = "below"; break; case 2: str = "left"; break; case 3: str = "right"; break; default: ew.eI(); str = "above"; break; } strArr[i3] = str; i2 = i4; } Boolean bool = myp.pui; if (bool != null) { int i5 = i2 + 1; strArr[i2] = "w:chapNum"; i2 = i5 + 1; strArr[i5] = ogi.zM(bool.booleanValue()); } Integer num2 = myp.puj; if (num2 != null) { int i6 = i2 + 1; strArr[i2] = "w:heading"; i2 = i6 + 1; strArr[i6] = Integer.toString(num2.intValue()); } Boolean bool2 = myp.puk; if (bool2 != null) { int i7 = i2 + 1; strArr[i2] = "w:noLabel"; i2 = i7 + 1; strArr[i7] = ogi.zM(bool2.booleanValue()); } Integer num3 = myp.pul; if (num3 != null) { int i8 = i2 + 1; strArr[i2] = "w:numFmt"; i2 = i8 + 1; strArr[i8] = ogi.VO(num3.intValue()); } Integer num4 = myp.pum; if (num4 != null) { int i9 = i2 + 1; strArr[i2] = "w:heading"; i2 = i9 + 1; strArr[i9] = ogi.VN(num4.intValue()); } if (i2 != 0) { odf.a("w:caption", strArr, i2); } } mym[] mymArr = (mym[]) sp; if (mymArr != null) { ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("autoCaptions should not be null!", mymArr); odf.i("w:autoCaptions", new String[0]); for (mym mym : mymArr) { ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("autoCaptionType should not be null!", mym); String[] strArr2 = new String[4]; String str3 = mym.mName; if (str3 != null) { strArr2[0] = "w:name"; strArr2[1] = str3; i = 2; } else { i = 0; } String str4 = mym.puf; if (str4 != null) { int i10 = i + 1; strArr2[i] = "w:caption"; i = i10 + 1; strArr2[i10] = str4; } odf.a("w:autoCaption", strArr2, i); } odf.endElement("w:autoCaptions"); } odf.endElement("w:captions"); } } private static void a(odf odf, mdq mdq) { if (!(mdq == null || mdq.map.isEmpty())) { odf.i("w:docVars", new String[0]); for (mdq.a aVar : mdq.dEN()) { odf.j("w:docVar", "w:name", aVar.name, "w:val", aVar.value); } odf.endElement("w:docVars"); } } private static void a(odf odf, String[] strArr) { for (String str : strArr) { odf.fE("w:attachedSchema", str); } } private static void a(odf odf, myt[] mytArr) { int i; for (myt myt : mytArr) { String[] strArr = new String[6]; String str = myt.mName; if (str != null) { strArr[0] = "w:name"; i = 2; strArr[1] = str; } else { i = 0; } String str2 = myt.jmR; if (str2 != null) { int i2 = i + 1; strArr[i] = "w:uri"; i = i2 + 1; strArr[i2] = str2; } String str3 = myt.puz; if (str3 != null) { int i3 = i + 1; strArr[i] = "w:val"; i = i3 + 1; strArr[i3] = str3; } if (i != 0) { odf.a("w:compatSetting", strArr, i); } } } private static void a(odf odf, mzu[] mzuArr) { int i; for (mzu mzu : mzuArr) { ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("smartTag should not be null!", mzu); String[] strArr = new String[6]; String str = mzu.pwe; if (str != null) { strArr[0] = "w:namespaceuri"; i = 2; strArr[1] = str; } else { i = 0; } String str2 = mzu.mName; if (str2 != null) { int i2 = i + 1; strArr[i] = "w:name"; i = i2 + 1; strArr[i2] = str2; } String str3 = mzu.cvP; if (str3 != null) { int i3 = i + 1; strArr[i] = "w:url"; i = i3 + 1; strArr[i3] = str3; } if (i != 0) { odf.a("w:smartTagType", strArr, i); } } } private static boolean hG(int i, int i2) { return (i2 & i) != 0; } }